<?php
/*
	关于系统以及框架
*/
class AboutController extends BaseController
{
	public function indexAction()
	{
		//$this->load();
		parent::load([
			'title'=>'关于平台'
		]);
		$phaStr = '版本号： '.Phalcon\Version::get().'<br>获取系统ID：'.Phalcon\Version::getId();
		$this->view->setVars(array(
			'phaStr'=>$phaStr
		));
	}
	public function testAction()
	{
		//echo '<pre>';
		//print_r($this->di);
		//print_r($this->db);//配置文件
		//$cars = $this->modelsManager->executeQuery("SELECT * FROM net_user where user_code=\"346185011\"");
		//print_r($cars);
		
		$db = $this->getDbObj();
		$data = $db->fetchAll('select * from net_user where user_code="346185011"');
		//$data->setFetchMode(Phalcon\Db::FETCH_ASSOC);
		//$data->setFetchMode(Phalcon\Db::FETCH_ASSOC);
		echo '<pre>';
		print_r($data);
		//$this->query('select * from net_user where user_code="346185011"');
		print_r($db->fetchOne('select * from net_user where user_code="346185011"'));
		print_r($db->fetchAll('select * from net_user where user_code="346185011"'));
	}
}
